Add FTPS with SSL/TLS configuration#1522
Closed
YasanPunch wants to merge 37 commits intoballerina-platform:masterfrom
Closed
Add FTPS with SSL/TLS configuration#1522YasanPunch wants to merge 37 commits intoballerina-platform:masterfrom
YasanPunch wants to merge 37 commits intoballerina-platform:masterfrom
Conversation
…nd SSL/TLS certificate handling.
… 990 for IMPLICIT FTPS if unspecified. Improved KeyStore loading from Ballerina records and error handling for secure socket configurations.
…improved error handling for KeyStore loading, and added documentation regarding the limitations of hostname verification support.
…r implementations, as it is not supported by the current version of Apache Commons VFS2. Clean up related code and constants.
… configuration - Introduced tests for FTPS client operations including explicit and implicit modes, file handling, and error scenarios. - Added tests for FTPS listener functionality, ensuring correct event handling for file changes. - Improved error handling for secure socket configurations in both client and server implementations. - Updated mock server utilities to include FTPS server initialization for testing purposes.
… relevant files for consistency, , remove hardcoded credentials and enhance password handling for improved security.
- Refactored test structure for better isolation and clarity. - Introduced helper functions for state management and event handling. - Improved file handling in tests, ensuring robust cleanup and setup. - Updated mock server utilities to ensure isolated test environments for FTPS operations.
…ments - Introduced a new configuration for testing the default port logic, ensuring that port 21 is correctly swapped to 990 for implicit mode. - Added a cleanup function to manage test environment state after execution. - Enhanced existing test cases to validate the new configuration and ensure robust error handling during FTPS operations.
- Updated the FTPS client test to use a more descriptive variable name for error handling. - Increased the wait count in listener tests to ensure proper event detection. - Improved error message clarity for invalid truststore scenarios in tests. - Adjusted the FtpClient to default to port 990 when port 21 is specified for implicit FTPS mode.
…ing age filtering and timeout handling.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Purpose
Fixes: ballerina-platform/ballerina-library/#8489
Adds FTPS (FTP over SSL/TLS) support to the FTP module, enabling secure file transfers using SSL/TLS certificates and encrypted data channels.
Changes:
API Changes:
(Current) Usage Example:
Usage Example
ftp:ClientConfiguration ftpsConfig = {
protocol: ftp:FTPS,
host: "ftps.example.com",
port: 21,
auth: {
credentials: {username: "user", password: "pass"},
secureSocket: {
key: {path: "client.p12", password: "keypass"},
cert: {path: "truststore.p12", password: "trustpass"},
mode: ftp:EXPLICIT,
dataChannelProtection: ftp:PRIVATE
}
}
};
Future Enhancements (TODO):
Checklist